<template>
  <div>
    <lay-button type="primary" @click="openModel">查看当前设备信息</lay-button>
  </div>
</template>

<script setup>
import Model from '@/components/Layer/Model.vue'
import { layer } from '@layui/layui-vue'
import {h} from 'vue'
import {getDevInfo} from '@/api/Benefit.js'

const openModel = async() => {
  const res = await getDevInfo({
    _id:'6465b8684b407eccd6448dc5'
  })

  layer.open({
    type:'page',
    title:'组件页面',
    content:h(Model,{data:res.data})
  })
}
</script>

<style scoped>

</style>